package com.kookapi.business.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.kookapi.common.annotation.Excel;
import com.kookapi.common.core.domain.BaseEntity;

/**
 * 接口定义管理对象 kookapi_api_definition
 * 
 * @author cleftgou
 * @date 2025-10-05
 */
public class ApiDefinition extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 接口名称 */
    @Excel(name = "接口名称")
    private String name;

    /** HTTP方法 (GET 0/POST 1/PUT 2/DELETE 3等) */
    @Excel(name = "HTTP方法 (GET 0/POST 1/PUT 2/DELETE 3等)")
    private String method;

    /** 接口分类 */
    @Excel(name = "接口分类")
    private String category;

    /** 接口URL */
    @Excel(name = "接口URL")
    private String url;

    /** 请求头 (JSON格式) */
    private String headers;

    /** 请求体模板 (支持变量占位符) */
    private String requestTemplate;

    /** 接口描述 */
    private String description;

    /** 删除标记：0正常，1已删除 */
    private String delFlag;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }

    public void setMethod(String method) 
    {
        this.method = method;
    }

    public String getMethod() 
    {
        return method;
    }

    public void setCategory(String category) 
    {
        this.category = category;
    }

    public String getCategory() 
    {
        return category;
    }

    public void setUrl(String url) 
    {
        this.url = url;
    }

    public String getUrl() 
    {
        return url;
    }

    public void setHeaders(String headers) 
    {
        this.headers = headers;
    }

    public String getHeaders() 
    {
        return headers;
    }

    public void setRequestTemplate(String requestTemplate) 
    {
        this.requestTemplate = requestTemplate;
    }

    public String getRequestTemplate() 
    {
        return requestTemplate;
    }

    public void setDescription(String description) 
    {
        this.description = description;
    }

    public String getDescription() 
    {
        return description;
    }

    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("name", getName())
            .append("method", getMethod())
            .append("category", getCategory())
            .append("url", getUrl())
            .append("headers", getHeaders())
            .append("requestTemplate", getRequestTemplate())
            .append("description", getDescription())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("createBy", getCreateBy())
            .append("updateBy", getUpdateBy())
            .append("remark", getRemark())
            .append("delFlag", getDelFlag())
            .toString();
    }
}
